import java.util.Calendar;

public class CalendarTest {
    public static void main(String[] args) {
        Calendar c = Calendar.getInstance();
        System.out.println(c.getTime());
        System.out.println(c.get(Calendar.YEAR));
        System.out.println(c.get(Calendar.MONTH));
        System.out.println(c.get(Calendar.DATE));
        c.set(2991,1,21,12,23,1);
        //c.add(Calendar.YEAR, -1);
        System.out.println(c.getTime());
        c.roll(Calendar.MONTH,-8);
        System.out.println(c.getTime());
    }
}
